//============================================================================
// Copyright (C) 2010 Brett R. Jones
// All Rights Reserved
//
// You may redistribute and/or modify for non commercial and commercial uses
// provided this copyright notice remains in place and is not modified
//
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================

// implements basic sound play functionality callable from jni

package com.roguetreasure.destroytheworld;

// implements sound interface callable from native c++ code
public class SoundInterface
{
	//=== vars ===// 
	//private static final String LOG_TAG = "SoundInterface: ";
	private static DestroyWorldActivity m_oActivity;
	
	
    //=== constructors ===//  
    public SoundInterface() 
    {
    	//Log.i(LOG_TAG, "SoundInterface: constructed");
    }
    //=== startup ===//  
    public void Startup(DestroyWorldActivity oActivity) 
    {
    	//Log.i(LOG_TAG, "SoundInterface: startup");
        m_oActivity = oActivity;
    }
    
	//! call to play music ( background sound )
	//@SuppressWarnings("static-access")
	public static void MusicPlay( String strSnd ) 
    {
		//Log.i(LOG_TAG, "SoundInterface: MusicPlay " + strSnd );
		m_oActivity.m_oSoundMgr.MusicPlay( strSnd );
    }
	//! call to pause music
	public static void MusicPause( String strSnd ) 
    {
		//Log.i(LOG_TAG, "SoundInterface: MusicPause " + strSnd );
		m_oActivity.m_oSoundMgr.MusicPause( strSnd );
    }
	//! call to stop music
	public static void MusicStop( String strSnd ) 
    {
		//Log.i(LOG_TAG, "SoundInterface: MusicStop " + strSnd );
		m_oActivity.m_oSoundMgr.MusicStop( strSnd );
    }
	//! call to set music volume
	public static void MusicSetVolume( float f32Volume ) 
    {
		//Log.i(LOG_TAG, "SoundInterface: MusicSetVolume");
		m_oActivity.m_oSoundMgr.MusicSetVolume( f32Volume );
    }
	//! call to play sfx ( sound effect )
	public static void SfxPlay( String strSnd ) 
    {
		//Log.i(LOG_TAG, "SoundInterface: SfxPlay " + strSnd );
		m_oActivity.m_oSoundMgr.SfxPlay( strSnd );
    }
	//! call to pause sfx
	public static void SfxPause( String strSnd ) 
    {
		//Log.i(LOG_TAG, "SoundInterface: SfxPause " + strSnd );
		m_oActivity.m_oSoundMgr.SfxPause( strSnd );
    }
	//! call to stop sfx
	public static void SfxStop( String strSnd ) 
    {
		//Log.i(LOG_TAG, "SoundInterface: SfxStop " + strSnd );
		m_oActivity.m_oSoundMgr.SfxStop( strSnd );
	}
	//! call to set sfx volume
	public static void SfxSetVolume( float f32Volume ) 
    {
		//Log.i(LOG_TAG, "SoundInterface: SfxSetVolume");
		m_oActivity.m_oSoundMgr.SfxSetVolume( f32Volume );
    }
	//! call to play movie ( game cut scene )
	public static void MoviePlay( String strMovie ) 
    {
		//Log.i(LOG_TAG, "SoundInterface: MoviePlay " + strMovie );
		//m_oActivity.m_oSoundMgr.MoviePlay( strMovie );
		m_oActivity.playMovie( strMovie );
    }
};
